/summon villager ~ ~2 ~ {VillagerData:{profession:librarian,level:5,type:plains},Offers:{Recipes:[
{buy:{id:iron_ingot,Count:4}
,sell:{id:music_disc_far,Count:1,tag:
{display:{Name:"{\"text\":\"Iron Talisman Level 1\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:-0.05,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.2,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:1,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]},maxUses:9999999}},

{buy:{id:music_disc_far,Count:1,tag:
{display:{Name:"{\"text\":\"Iron Talisman Level 1\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:-0.05,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.2,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:1,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:iron_ingot,Count:2,tag:
{display:{Name:"{\"text\":\"Iron Upgrade\",\"color\":\"gray\"}"}}}
,sell:{id:music_disc_far,Count:1,tag:
{display:{Name:"{\"text\":\"Iron Talisman Level 2\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:-0.08,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.4,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_far,Count:1,tag:
{display:{Name:"{\"text\":\"Iron Talisman Level 2\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:-0.08,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.4,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:2,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:iron_ingot,Count:4,tag:
{display:{Name:"{\"text\":\"Iron Upgrade\",\"color\":\"gray\"}"}}}
,sell:{id:music_disc_far,Count:1,tag:
{display:{Name:"{\"text\":\"Iron Talisman Level 3\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:-0.12,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.6,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:3,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_far,Count:1,tag:
{display:{Name:"{\"text\":\"Iron Talisman Level 3\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:-0.12,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.6,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:3,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:iron_ingot,Count:10,tag:
{display:{Name:"{\"text\":\"Iron Upgrade\",\"color\":\"gray\"}"}}}
,sell:{id:music_disc_far,Count:1,tag:
{display:{Name:"{\"text\":\"Iron Talisman Level 4\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:-0.16,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.8,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999},

{buy:{id:music_disc_far,Count:1,tag:
{display:{Name:"{\"text\":\"Iron Talisman Level 4\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:-0.16,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:0.8,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:4,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}}
,buyB:{id:iron_ingot,Count:20,tag:
{display:{Name:"{\"text\":\"Iron Upgrade\",\"color\":\"gray\"}"}}}
,sell:{id:music_disc_far,Count:1,tag:
{display:{Name:"{\"text\":\"Iron Talisman Level 5\",\"color\":\"gray\"}"},AttributeModifiers:
[{AttributeName:"generic.movementSpeed",Name:"generic.movementSpeed",Amount:-0.2,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.knockbackResistance",Name:"generic.knockbackResistance",Amount:1,Operation:1,UUIDLeast:1,UUIDMost:1,Slot:"offhand"},
{AttributeName:"generic.armorToughness",Name:"generic.armorToughness",Amount:5,Operation:0,UUIDLeast:1,UUIDMost:1,Slot:"offhand"}]}},maxUses:9999999}]}}